package com.songlanyun.modules.gains.controller.admin;

import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;
import com.songlanyun.modules.gains.service.ShopOrderGainsService;
import com.songlanyun.modules.shop.model.vo.ShopWithdrawVO;
import com.songlanyun.modules.shop.service.ShopService;
import com.songlanyun.modules.user.controller.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

//import org.apache.shiro.authz.annotation.RequiresPermissions;


/**
 * 商家销售商品所得表
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-12-03 11:03:16
 */
@RestController
@RequestMapping("admin/shop/gains")
public class ShopOrderGainsAdminController extends AbstractController {
    @Autowired
    private ShopOrderGainsService shopOrderGainsService;

    @Autowired
    private ShopService shopService;

    /**
     * 商家销售商品所得表分页
     * settlement  true,false
     * order_code  str
     * exists_refund true ,false
     * page
     * limit
     */
    @RequestMapping("/pages")
    //@RequiresPermissions("gains:shopordergains:list")
    public R list(@RequestParam Map<String, Object> params){
        params.put("shop_id",getShopId());
        PageUtils page = shopOrderGainsService.queryPage(params);
        return R.ok().put("page", page);
    }


}
